package com.trade.service.impl;

import java.util.List;

import com.trade.dao.IUserDao;
import com.trade.model.User;
import com.trade.service.IUserService;

/**
 * 
 * @author Lin Yang
 * 
 */
public class UserServiceImpl implements IUserService {
    private IUserDao userDao;

    public void setUserDao(IUserDao userDao) {
        this.userDao = userDao;
    }

    public IUserDao getUserDao()
    {
        return this.userDao;
    }
    
    @Override
    public User getUser(String userName)
    {
        return userDao.getByUserName(userName);
    }
    
    @Override
    public User getUserByUserID(String strUserID)
    {
        return userDao.GetUserById(strUserID);
    }

    
    @Override
    public Boolean AddUser(User user) {
        return userDao.AddUser(user);
    }

    @Override
    public List<User> getAllUsers()
    {
    	return userDao.getAllUsers();
    }
    
    @Override
    public Boolean DeleteUser(String strUserID)
    {
    	return userDao.DeleteUser(strUserID);
    }
    
    @Override
    public Boolean UpdateUser(User user)
    {
    	return userDao.UpdateUser(user);
    }
    
}
